import  React,{Component} from "react";
import Go from './go.jsx'
import Indexs from './index/indexs.jsx'
import NewIndex from './news/new_index.jsx'
import  ShopList from './shop/shop_list.jsx'
import Car from  './car/car.jsx'
import  ShopDetail from  './shop/shop_detail.jsx'
import {Router,Route,IndexRoute} from 'react-router';
import {hashHistory} from 'react-router';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import reducers from '../reducers'
let store = createStore(reducers)




export  default  class App extends  Component{
    constructor(props){
        super(props)
        this.state={msg:"hellow world"}
    }
    componentDidMount(){

    }
    render(){
        return(
            <Provider store={store}>
            <Router history={hashHistory} routes={routes} />
            </Provider>
        )
    }
}

let routes = <Route path="/" component={Go}>
                <IndexRoute  component={Indexs}/>
                 <Route path="news" component={NewIndex} />
                 <Route path="money" component={NewIndex} />
                <Route path="happy" component={NewIndex} />
                <Route path="nba" component={NewIndex} />
                <Route path="sci" component={NewIndex} />
                <Route path="xz" component={NewIndex} />
                <Route path="sport" component={NewIndex} />
                <Route path="more" component={NewIndex} />
                <Route path="app" component={NewIndex} />
                <Route path="soldier" component={NewIndex} />
                <Route path="list" component={ShopList} />
                <Route path="shop_detail" component={ShopDetail} />
                <Route path="car" component={Car} />
            </Route>